package com.ruoyi.sales.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sales.mapper.SalesOrderExecutionMapper;
import com.ruoyi.sales.domain.SalesOrderExecution;
import com.ruoyi.sales.service.ISalesOrderExecutionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售订单执行记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class SalesOrderExecutionServiceImpl implements ISalesOrderExecutionService 
{
    @Autowired
    private SalesOrderExecutionMapper salesOrderExecutionMapper;

    /**
     * 查询销售订单执行记录
     * 
     * @param executionId 销售订单执行记录主键
     * @return 销售订单执行记录
     */
    @Override
    public SalesOrderExecution selectSalesOrderExecutionByExecutionId(Long executionId)
    {
        return salesOrderExecutionMapper.selectSalesOrderExecutionByExecutionId(executionId);
    }

    /**
     * 查询销售订单执行记录列表
     * 
     * @param salesOrderExecution 销售订单执行记录
     * @return 销售订单执行记录
     */
    @Override
    public List<SalesOrderExecution> selectSalesOrderExecutionList(SalesOrderExecution salesOrderExecution)
    {
        return salesOrderExecutionMapper.selectSalesOrderExecutionList(salesOrderExecution);
    }

    /**
     * 新增销售订单执行记录
     * 
     * @param salesOrderExecution 销售订单执行记录
     * @return 结果
     */
    @Override
    public int insertSalesOrderExecution(SalesOrderExecution salesOrderExecution)
    {
        return salesOrderExecutionMapper.insertSalesOrderExecution(salesOrderExecution);
    }

    /**
     * 修改销售订单执行记录
     * 
     * @param salesOrderExecution 销售订单执行记录
     * @return 结果
     */
    @Override
    public int updateSalesOrderExecution(SalesOrderExecution salesOrderExecution)
    {
        return salesOrderExecutionMapper.updateSalesOrderExecution(salesOrderExecution);
    }

    /**
     * 批量删除销售订单执行记录
     * 
     * @param executionIds 需要删除的销售订单执行记录主键
     * @return 结果
     */
    @Override
    public int deleteSalesOrderExecutionByExecutionIds(String executionIds)
    {
        return salesOrderExecutionMapper.deleteSalesOrderExecutionByExecutionIds(Convert.toStrArray(executionIds));
    }

    /**
     * 删除销售订单执行记录信息
     * 
     * @param executionId 销售订单执行记录主键
     * @return 结果
     */
    @Override
    public int deleteSalesOrderExecutionByExecutionId(Long executionId)
    {
        return salesOrderExecutionMapper.deleteSalesOrderExecutionByExecutionId(executionId);
    }
} 